package test;

import java.sql.SQLException;

import javax.annotation.Resource;
import javax.sql.DataSource;

import org.apache.commons.dbcp.BasicDataSource;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;
import org.springframework.stereotype.Component;

import collector.Collector;
import collector.NetCollector;
import render.PieRender;
import render.Render;

public class CopyOfAction {
	public static void main(String[] args) throws Exception {
		//create spring  IOC container..
		ApplicationContext context = new ClassPathXmlApplicationContext("Copy of applicationContext.xml");
		
		Render r1=(Render) context.getBean("lineRender");
		r1.render();
		
		Render r2=(Render) context.getBean("pieRender");
		r2.render();
		
		DataSource ds = (DataSource) context.getBean("dataSource2");
		System.out.println(ds.getConnection());
		
	}

}
